package com.hcxwope.mybatis;

import com.hcxwope.mybatis.Util.SqlSessionUtil;
import com.hcxwope.mybatis.mapper.CarMapper;
import com.hcxwope.mybatis.mapper.StudentMapper;
import com.hcxwope.mybatis.pojo.Car;
import com.hcxwope.mybatis.pojo.Student;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

public class test {
    @Test
    public void tess(){
        SqlSession sqlSession = SqlSessionUtil.openSession();
        CarMapper mapper = sqlSession.getMapper(CarMapper.class);
        Car car = mapper.selectByPrimaryKey(1L);
        System.out.println(car.toString());
        sqlSession.close();
    }

}
